<?php
declare (strict_types = 1);
namespace app\school\logic\school;

use app\common\exception\LogicException;
use app\school\model\school\SchoolSplitConfig as SchoolSplitConfigModel;
use think\facade\Event;

/**
 * 机构分成配置逻辑层
 */
class SchoolSplitConfig extends SchoolSplitConfigModel
{

    /**
     * 获取分成配置
     * Author 亓官雨树<lucky.max@foxmail.com>
     * Date：   2020-08-27
     * @return [type]                      [description]
     */
    public function getSplitConfig($mhm_id = 0)
    {
        $config = $this->scope('status')->where('mhm_id', $mhm_id)->findOrEmpty();

        return $config->isEmpty() ? [] : $config->getAttr('value');
    }
}
